Optimal. Leaf size=81 \[ -\frac {\text {ArcTan}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {2} \sqrt {a+a \sec (e+f x)}}\right )}{\sqrt {2} \sqrt {a} c f}+\frac {\cot (e+f x) \sqrt {a+a \sec (e+f x)}}{a c f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 116, normalized size of antiderivative = 1.43, number of steps
used = 4, number of rules used = 4, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {4049, 79, 65,
214} \begin {gather*} -\frac {\tan (e+f x)}{f \sqrt {a \sec (e+f x)+a} (c-c \sec (e+f x))}-\frac {\tan (e+f x) \tanh ^{-1}\left (\frac {\sqrt {c-c \sec (e+f x)}}{\sqrt {2} \sqrt {c}}\right )}{\sqrt {2} \sqrt {c} f \sqrt {a \sec (e+f x)+a} \sqrt {c-c \sec (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 79
Rule 214
Rule 4049
Rubi steps
\begin {align*} \int \frac {\sec ^2(e+f x)}{\sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))} \, dx &=-\frac {(a c \tan (e+f x)) \text {Subst}\left (\int \frac {x}{(a+a x) (c-c x)^{3/2}} \, dx,x,\sec (e+f x)\right )}{f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}\\ &=-\frac {\tan (e+f x)}{f \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))}+\frac {(a \tan (e+f x)) \text {Subst}\left (\int \frac {1}{(a+a x) \sqrt {c-c x}} \, dx,x,\sec (e+f x)\right )}{2 f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}\\ &=-\frac {\tan (e+f x)}{f \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))}-\frac {(a \tan (e+f x)) \text {Subst}\left (\int \frac {1}{2 a-\frac {a x^2}{c}} \, dx,x,\sqrt {c-c \sec (e+f x)}\right )}{c f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}\\ &=-\frac {\tan (e+f x)}{f \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))}-\frac {\tanh ^{-1}\left (\frac {\sqrt {c-c \sec (e+f x)}}{\sqrt {2} \sqrt {c}}\right ) \tan (e+f x)}{\sqrt {2} \sqrt {c} f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.47, size = 73, normalized size = 0.90 \begin {gather*} -\frac {\cot \left (\frac {1}{2} (e+f x)\right ) \left (-2+\sqrt {2} \text {ArcTan}\left (\frac {\sqrt {-1+\sec (e+f x)}}{\sqrt {2}}\right ) \sqrt {-1+\sec (e+f x)}\right )}{2 c f \sqrt {a (1+\sec (e+f x))}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(203\) vs.
\(2(70)=140\).
time = 3.11, size = 204, normalized size = 2.52
method | result | size |
default | \(-\frac {\sqrt {\frac {a \left (\cos \left (f x +e \right )+1\right )}{\cos \left (f x +e \right )}}\, \left (\sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \left (\cos ^{2}\left (f x +e \right )\right ) \ln \left (\frac {\sin \left (f x +e \right ) \sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}-\cos \left (f x +e \right )+1}{\sin \left (f x +e \right )}\right )-\sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \ln \left (\frac {\sin \left (f x +e \right ) \sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}-\cos \left (f x +e \right )+1}{\sin \left (f x +e \right )}\right )+2 \cos \left (f x +e \right ) \sin \left (f x +e \right )\right )}{2 c f \left (\cos ^{2}\left (f x +e \right )-1\right ) a}\) | \(204\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.74, size = 282, normalized size = 3.48 \begin {gather*} \left [\frac {\sqrt {2} a \sqrt {-\frac {1}{a}} \log \left (\frac {2 \, \sqrt {2} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {-\frac {1}{a}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + 3 \, \cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) + 1}\right ) \sin \left (f x + e\right ) + 4 \, \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{4 \, a c f \sin \left (f x + e\right )}, \frac {\sqrt {2} \sqrt {a} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {a} \sin \left (f x + e\right )}\right ) \sin \left (f x + e\right ) + 2 \, \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{2 \, a c f \sin \left (f x + e\right )}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {\int \frac {\sec ^{2}{\left (e + f x \right )}}{\sqrt {a \sec {\left (e + f x \right )} + a} \sec {\left (e + f x \right )} - \sqrt {a \sec {\left (e + f x \right )} + a}}\, dx}{c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.99, size = 132, normalized size = 1.63 \begin {gather*} \frac {\frac {\sqrt {2} \log \left ({\left (\sqrt {-a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )}^{2}\right )}{\sqrt {-a} c \mathrm {sgn}\left (\cos \left (f x + e\right )\right )} - \frac {4 \, \sqrt {2} \sqrt {-a}}{{\left ({\left (\sqrt {-a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )}^{2} - a\right )} c \mathrm {sgn}\left (\cos \left (f x + e\right )\right )}}{4 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} -\int \frac {1}{\sqrt {a+\frac {a}{\cos \left (e+f\,x\right )}}\,\left (c\,\cos \left (e+f\,x\right )-c\,\left (\frac {\cos \left (2\,e+2\,f\,x\right )}{2}+\frac {1}{2}\right )\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________